<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

	<form action="changepwd" method="post" id="myform">
		<input type="hidden" value="${student.passWord}" id="ymm" name="ymm">
		<div class="input-group" style="width:400px;margin-left:400px;">
            <input type="password" class="form-control" placeholder="原密码" id="pwd" name="pwd">
        </div>
        <br/>
        <div class="input-group" style="width:400px;margin-left:400px;">
            <input type="password" class="form-control" placeholder="新密码" id="pwd1" name="pwd1"/> 
        </div>
         <br/>
        <div class="input-group" style="width:400px;margin-left:400px;">
            <input type="password" class="form-control" placeholder="确认密码"  id="pwd2" name="pwd2"/>
        </div>
         <br/>
        <div class="input-group" style="width:400px;margin-left:480px;">
        	<button type="submit" class="btn btn-primary" style="width: 80px;height:40px;">确认</button>
        	<button type="reset"  class="btn btn-danger" style="margin-left:80px;width: 80px;height:40px;">重置</button>
        </div>
	</form>
<script type="text/javascript">
$().ready(function() {
    $("#myform").validate({
    	rules:{
    		pwd:{
    			required:true,
    			equalTo:'#ymm'
    		},
    		pwd1:'required',
    		pwd2:{
    			required:true,
    			equalTo:'#pwd1'
    		},
    	},
    	messages:{
    		ymm:{
    			required:'请输入原密码',
    			equalTo:'您输入的原密码错误'
    		},
    		pwd1:'请输入你要修改的新密码',
    		pwd2:{
    			equalTo:'两次密码输入不一致',
    			required:'请再次输入你要修改后的新密码'
    		},
    	}
    });
});
</script>